package com.hl.toolkit.server.tycoin.user.slaverepository;

import com.tycoin.common.repository.AbstractRepository;
import com.tycoin.user.slaveentity.TycoinUserBank;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
@CacheConfig(cacheNames = "com.tycoin.user.slaverepository.TycoinUserBankRepository")
public interface TycoinUserBankRepository extends AbstractRepository<TycoinUserBank, Long> {

	TycoinUserBank findOneBycardNo(String cardNo);

	
	
 	@Query(" select t from TycoinUserBank t where t.userId = :userId  ")
	List<TycoinUserBank> findByUserIdAll(@Param("userId") String userId);

 
}
